import React, {Component} from "react";
import {connect} from 'react-redux';
import _ from 'lodash';
import * as actions from '../../action/index';

import "../../style/user-center.css";

class App extends Component {
    componentDidMount = () => {
      const uuid = this.props.match.params.uuid
      this.props.resetEmail(uuid);
    };

    render() {
        return (
            <div className="email-reset-info">
              {_.get(this.props.emailResetStatus,"message","修改绑定邮箱还在处理中，请稍后...")}
            </div>
        );
    }
}

const mapDispatchToProps = dispatch => ({
  resetEmail: (uuid) => dispatch(actions.resetEmail(uuid))
});


export default connect((state) => ({
  emailResetStatus: state.emailResetStatus
}), mapDispatchToProps)(App);

